home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / appkit / errors.h < prev    next >
Text File  |  1992-01-09  |  3KB  |  77 lines

  1. /*
  2.     errors.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. /* Contains error numbers for the appkit. */
  8.  
  9. #ifndef APPKIT_ERROR_H
  10. #define APPKIT_ERROR_H
  11. #ifndef ERROR_H
  12. #import <objc/error.h>
  13. #endif ERROR_H
  14.  
  15. #define NX_APPKIT_ERROR_BASE 3000  /* Kit errors start here.  We get 1000 */
  16. #define NX_APPKITERRBASE 3000       /* historical synonym */
  17.  
  18. #define NX_APP_ERROR_BASE 10000000 /* app defined errors start here */
  19. #define NX_APPBASE 10000000       /* historical synonym */
  20.  
  21. typedef enum _NXAppkitErrorTokens {
  22.     NX_longLine    = NX_APPKIT_ERROR_BASE,  /* Text, line longer than 16384 chars */
  23.     NX_nullSel,        /* Text, operation attempted on empty selection */
  24.     NX_wordTablesWrite,        /* error while writing word tables */
  25.     NX_wordTablesRead,        /* error while reading word tables */
  26.     NX_textBadRead,        /* Text, error reading from file */
  27.     NX_textBadWrite,        /* Text, error writing to file */
  28.     NX_powerOff,        /* poweroff */
  29.     NX_pasteboardComm,        /* communications prob with pbs server */
  30.     NX_mallocError,        /* malloc problem */
  31.     NX_printingComm,        /* sending to npd problem */
  32.     NX_abortModal,        /* used to abort modal panels */
  33.     NX_abortPrinting,        /* used to abort printing */
  34.     NX_illegalSelector,        /* bogus selector passed to appkit */
  35.     NX_appkitVMError,        /* error from vm_ call */
  36.     NX_badRtfDirective,
  37.     NX_badRtfFontTable,
  38.     NX_badRtfStyleSheet,
  39.     NX_newerTypedStream,
  40.     NX_tiffError,
  41.     NX_printPackageError,    /* problem loading the print package */
  42.     NX_badRtfColorTable,
  43.     NX_journalAborted,
  44.     NX_draggingError,
  45.     NX_colorUnknown,        /* NXColorList, unknown color name or number */
  46.     NX_colorBadIO,        /* NXColorList file read/write error */
  47.     NX_colorNotEditable,    /* Attempt to change noneditable color list */
  48.     NX_badBitmapParams,        /* Inconsistent set of bitmap params */
  49.     NX_windowServerComm,    /* Communications prob with the window server */
  50.     NX_unavailableFont,        /* no default font could be found */
  51.     NX_PPDIncludeNotFound,    /* Include file in PPD file not found */
  52.     NX_PPDParseError,        /* PPD parsing error */
  53.     NX_PPDIncludeStackOverflow,    /* PPD include files nested too deep */
  54.     NX_PPDIncludeStackUnderflow,/* PPD include file nesting mismatched */
  55.     NX_rtfPropOverflow        /* Rtf property stack overflow */
  56. } NXAppkitErrorTokens;
  57.  
  58. /*
  59.  * The proc called when raised exceptions bubble up to the [Application run]
  60.  * level.
  61.  */
  62. typedef void NXTopLevelErrorHandler(NXHandler *errorState);
  63. extern NXTopLevelErrorHandler *_NXTopLevelErrorHandler;
  64. #define NXSetTopLevelErrorHandler( proc ) (_NXTopLevelErrorHandler = (proc))
  65. #define NXTopLevelErrorHandler() (_NXTopLevelErrorHandler)
  66. extern NXTopLevelErrorHandler NXDefaultTopLevelErrorHandler;
  67.  
  68. /*
  69.  * Mechanism for reporting information on errors.
  70.  */
  71. typedef void NXErrorReporter(NXHandler *errorState);
  72. extern void NXReportError(NXHandler *errorState); 
  73. extern void NXRegisterErrorReporter(int min, int max, NXErrorReporter *proc); 
  74. extern void NXRemoveErrorReporter(int code);
  75.  
  76. #endif APPKIT_ERROR_H
  77.